﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BusinessService.Plugin.Entity
{
    /// <summary>
    /// 协议参数设置全表（实体）
    /// </summary>
    [Tenant("1")]//对应ConfigId
    public class AllSet
    {

        /// <summary>
        /// Id主键
        /// </summary>
        [SugarColumn(ColumnDescription = "ID主键", IsPrimaryKey = true)]
        public long N_Id { get; set; }


        /// <summary>
        /// 通道名称
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public  string V_Name { get; set; }

        /// <summary>
        /// 角色【1：接收端，2：发送端】
        /// </summary>
        public int N_Role { get; set; }

        /// <summary>
        /// 协议类型【Http  :  Socket  :  MQTT】
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string V_ProtocolType { get; set; } = string.Empty;

        /// <summary>
        /// Url地址
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Http_Url { get; set; } = string.Empty;
        /// <summary>
        /// HTTP发送模式【Post：Get】
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Http_Method { get; set; } = string.Empty;

        /// <summary>
        /// HTTP授权
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Http_Token { get; set; } = string.Empty;

        /// <summary>
        /// HTTP协议Post模式下附加信息
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Http_PostInfo { get; set; } = string.Empty;


        /// <summary>
        /// TCP角色(服务器or客户端)
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string TCP_Role { get; set; } = string.Empty;

        /// <summary>
        /// IP地址
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string IP { get; set; } = string.Empty;
        /// <summary>
        /// 端口号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int Port { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MQTT_UserName { get; set; } = string.Empty;
        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MQTT_PassWord { get; set; } = string.Empty;

        /// <summary>
        /// MQTT主题
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MQTT_Topics { get; set; } = string.Empty;

    }
}
